import 'package:base_flutter/base_flutter.dart';

/// rootId : ""
/// parentCode : null
/// codeLevel : 1
/// codeValue : "1"
/// nameCn : "隐藏金额"
/// nameEn : null
/// codeAtt : null
/// orderNum : 1
/// codeValueVersion : "1.0"
/// validSign : 1
/// codeTypeId : 38391
/// remark : ""
/// tenantId : 1000
/// branchId : 6627
/// branchIds : null
/// codeValueList : null
/// saasId : 1000
/// id : 4451916412186624
/// createdBy : "5"
/// createdDate : "2023-04-27 17:01:53"
/// updatedBy : "5"
/// updatedDate : "2023-04-27 17:01:53"

class CodeValueList implements IPickerData {
  CodeValueList({
      this.rootId, 
      this.parentCode, 
      this.codeLevel, 
      this.codeValue, 
      this.nameCn, 
      this.nameEn, 
      this.codeAtt, 
      this.orderNum, 
      this.codeValueVersion, 
      this.validSign, 
      this.codeTypeId, 
      this.remark, 
      this.tenantId, 
      this.branchId, 
      this.branchIds, 
      this.codeValueList, 
      this.saasId, 
      this.id, 
      this.createdBy, 
      this.createdDate, 
      this.updatedBy, 
      this.updatedDate,});

  CodeValueList.fromJson(dynamic json) {
    rootId = json['rootId'];
    parentCode = json['parentCode'];
    codeLevel = json['codeLevel'];
    codeValue = json['codeValue'];
    nameCn = json['nameCn'];
    nameEn = json['nameEn'];
    codeAtt = json['codeAtt'];
    orderNum = json['orderNum'];
    codeValueVersion = json['codeValueVersion'];
    validSign = json['validSign'];
    codeTypeId = json['codeTypeId'];
    remark = json['remark'];
    tenantId = json['tenantId'];
    branchId = json['branchId'];
    branchIds = json['branchIds'];
    codeValueList = json['codeValueList'];
    saasId = json['saasId'];
    id = json['id'];
    createdBy = json['createdBy'];
    createdDate = json['createdDate'];
    updatedBy = json['updatedBy'];
    updatedDate = json['updatedDate'];
  }
  String? rootId;
  dynamic parentCode;
  num? codeLevel;
  String? codeValue;
  String? nameCn;
  dynamic nameEn;
  dynamic codeAtt;
  num? orderNum;
  String? codeValueVersion;
  num? validSign;
  num? codeTypeId;
  String? remark;
  num? tenantId;
  num? branchId;
  dynamic branchIds;
  dynamic codeValueList;
  num? saasId;
  num? id;
  String? createdBy;
  String? createdDate;
  String? updatedBy;
  String? updatedDate;
CodeValueList copyWith({  String? rootId,
  dynamic parentCode,
  num? codeLevel,
  String? codeValue,
  String? nameCn,
  dynamic nameEn,
  dynamic codeAtt,
  num? orderNum,
  String? codeValueVersion,
  num? validSign,
  num? codeTypeId,
  String? remark,
  num? tenantId,
  num? branchId,
  dynamic branchIds,
  dynamic codeValueList,
  num? saasId,
  num? id,
  String? createdBy,
  String? createdDate,
  String? updatedBy,
  String? updatedDate,
}) => CodeValueList(  rootId: rootId ?? this.rootId,
  parentCode: parentCode ?? this.parentCode,
  codeLevel: codeLevel ?? this.codeLevel,
  codeValue: codeValue ?? this.codeValue,
  nameCn: nameCn ?? this.nameCn,
  nameEn: nameEn ?? this.nameEn,
  codeAtt: codeAtt ?? this.codeAtt,
  orderNum: orderNum ?? this.orderNum,
  codeValueVersion: codeValueVersion ?? this.codeValueVersion,
  validSign: validSign ?? this.validSign,
  codeTypeId: codeTypeId ?? this.codeTypeId,
  remark: remark ?? this.remark,
  tenantId: tenantId ?? this.tenantId,
  branchId: branchId ?? this.branchId,
  branchIds: branchIds ?? this.branchIds,
  codeValueList: codeValueList ?? this.codeValueList,
  saasId: saasId ?? this.saasId,
  id: id ?? this.id,
  createdBy: createdBy ?? this.createdBy,
  createdDate: createdDate ?? this.createdDate,
  updatedBy: updatedBy ?? this.updatedBy,
  updatedDate: updatedDate ?? this.updatedDate,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['rootId'] = rootId;
    map['parentCode'] = parentCode;
    map['codeLevel'] = codeLevel;
    map['codeValue'] = codeValue;
    map['nameCn'] = nameCn;
    map['nameEn'] = nameEn;
    map['codeAtt'] = codeAtt;
    map['orderNum'] = orderNum;
    map['codeValueVersion'] = codeValueVersion;
    map['validSign'] = validSign;
    map['codeTypeId'] = codeTypeId;
    map['remark'] = remark;
    map['tenantId'] = tenantId;
    map['branchId'] = branchId;
    map['branchIds'] = branchIds;
    map['codeValueList'] = codeValueList;
    map['saasId'] = saasId;
    map['id'] = id;
    map['createdBy'] = createdBy;
    map['createdDate'] = createdDate;
    map['updatedBy'] = updatedBy;
    map['updatedDate'] = updatedDate;
    return map;
  }

  @override
  String get name => nameCn??"";

  @override
  set name(String _name) {
  }

}